package org.lanqiao.config;

import com.alibaba.druid.pool.DruidDataSource;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Description 配置数据源
 * @author: 吴永嘉
 * @date: 2019/5/13
 * @version: 1.0
 */
@Configuration
public class DruidConfig {

        @ConfigurationProperties(prefix = "spring.datasource")
        @Bean
        public DruidDataSource getDruidSource(){
            return new DruidDataSource();
        }
}
